package com.dailyblue.project.smbms.alibaba.stock.mapper;

import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;

@Mapper
public interface StockMapper {
    @Update("update smbms_stock set num=num-${num} where bid=${gid}")
    void updateStock(@Param("gid") String gid,@Param("num") String num);
    @Insert("insert into smbms_stock_log values(null,${uid},${gid},2,${num},null,now(),1)")
    void insertStockLog(@Param("uid") String uid,@Param("gid") String gid,@Param("num") String num);
}
